package org.cuit.epoch.seon.example;

/**
 * @author Seon
 * @version 1.0
 * @since 2024-09-18
 */
public class Leaf extends Component {

    public Leaf(String name) {
        super(name);
    }

    @Override
    public void add(Component component) {
        throw new UnsupportedOperationException("Not supported to add leaf yet.");
    }

    @Override
    public void remove(Component component) {
        throw new UnsupportedOperationException("Not supported to remove leaf yet.");
    }

    @Override
    public void display(int depth) {
        for (int i = 0; i < depth; i++) {
            System.out.print("--");
        }
        System.out.println(name);;
    }
}
